#ifndef SDOPENCV_HISTOGRAM_OF_ORIENTED_GRADIENTS_H
#define SDOPENCV_HISTOGRAM_OF_ORIENTED_GRADIENTS_H

#include <sdopencv/polygon.hpp>

namespace sdopencv
{
    // octagon with diagonals x=2y, -x=2y, 2x=y, 2x=-y
    unsigned char get_orientation2(short x, short y);


    // octagon with diagonals x=0, y=0, x=y, x=-y
    inline unsigned char get_orientation(short x, short y);


    // compute the oriented gradient image of an image
    // src = 8U 1 channel
    // tmp1, tmp2 = 16S 1 channels
    // dst = 8U 1 channel
    // for each pixel (x,y), dst(x,y) = index (from 0 to 8) of the orientation of the gradient
    void cvOrientedGradient(IplImage *src, IplImage *dst, IplImage *tmp1, IplImage *tmp2);
}


#endif
